call VRMessage 'Screen', 'Search criterion not defined. Nothing to do. ', 'Information'
return
end
pos = POS( '"0"', search )
if pos <> 0 then
do until pos = 0
search = DelStr( search, pos + 1, 1 )
pos = POS( '"0"', search )
end
pos = POS( '"0.0"', search )
if pos <> 0 then
do until pos = 0
search = DelStr( search, pos + 1, 3 )
pos = POS( '"0.0"', search )
end
pos = POS( '"0.00"', search )
if pos <> 0 then
do until pos = 0
search = DelStr( search, pos + 1, 4 )
pos = POS( '"0.00"', search )
end
pos = POS( '"0,0"', search )
if pos <> 0 then
do until pos = 0
search = DelStr( search, pos + 1, 3 )
pos = POS( '"0,0"', search )
end
pos = POS( '"0,00"', search )
if pos <> 0 then
do until pos = 0
search = DelStr( search, pos + 1, 4 )
pos = POS( '"0,00"', search )
end
drop pos
call VRSet 'MLESearch', 'Value', Search
/*
* Build formatted MLE string
*/
tmpSearch = Search
newSearch = ''
do until tmpSearch = ''
didContains = 0
word = Translate( Word( tmpSearch, 1 ) )
if word = '' then
leave
if( word <> 'DATE' & word <> 'NUMBER' & word <> 'PARTICULARS' & word <> 'CREDIT' & word <> 'DEBIT' & word <> 'BALANCE' & word <> 'MEMO' & word <> 'CATEGORY' & word <> 'MULTICATEGORY' & word <> '|' & word <> '&' & word <> '!' )then do
call VRMessage 'SWSearch', 'Syntax error: field not found. ', 'Error'
return
end
if( word = 'DATE' | word = 'NUMBER' | word = 'PARTICULARS' | word = 'CREDIT' | word = 'DEBIT' | word = 'BALANCE' | word = 'MEMO' | word = 'CATEGORY' | word = 'MULTICATEGORY' )then do
val = 'Translate( rec.i.!'||word' )'
tmpSearch = DelWord( tmpSearch, 1, 1 )
word = Word( tmpSearch, 1 )
if( word <> '?' & word <> '>' & word <> '<' & word <> '<>' & word <> '=' & word <> '!' )then do
call VRMessage 'SWSearch', 'Syntax error: symbol not found. ', 'Error'